<!-- <template>
	<view>
		<view class="cu-bar bg-white margin-top">
			<view class="cu-bar bg-white">
				<view class="action">
					<text class="cuIcon-title text-orange "></text> 上传图片
				</view>
			</view>
		</view>
		<view class="cu-form-group">
			<view class="grid col-4 grid-square flex-sub">
				<view class="bg-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" :data-url="imgList[index]">
				 <image :src="imgList[index]" mode="aspectFill"></image>
					<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="index">
						<text class='cuIcon-close'></text>
					</view>
				</view>
				<view class="solids" @tap="ChooseImage" v-if="imgList.length<9">
					<text class='cuIcon-cameraadd'></text>
				</view>
			</view>
		</view>
		<form>
			<view class="cu-form-group margin-top">
				<view class="title">农场名称</view>
				<picker @change="PickerChange1" range-key="name" :value="sel1"  :range="picker">
					<view class="picker">
						{{sel1>-1?picker[sel1]:'请选择'}}
					</view>
				</picker>
			</view>
			<view class="cu-form-group margin-top">
				<view class="title">管理区名称</view>
				<picker @change="PickerChange2" range-key="name" :value="sel2"  :range="picker">
					<view class="picker">
						{{sel2>-1?picker[sel2]:'请选择'}}
					</view>
				</picker>
			</view>
			<view class="cu-form-group margin-top">
				<view class="title">地块名称</view>
				<picker @change="PickerChange3" range-key="name" ind=3 :range="picker">
					<view class="picker">
						{{sel3>-1?picker[sel3]:'请选择'}}
					</view>
				</picker>
			</view>
		</form>
		<view class="padding">
			<button class="cu-btn block bg-blue margin-tb-sm lg">提交</button>
		</view>
	</view>
</template>

<script>
	export default {
		data(){
			return{
				sel1: -1,
				sel2: -1,
				sel3: -1,
				picker: [{
						ids: 11,
						name: '选项1'}, {
							ids: 12,
							name: '选项2'
						},
						{
							ids: 13,
							name: '选项3'
						},
						{
							ids: 14,
							name: '选项4'
						}
					],
				imgList: []
			}
		},
		methods:{
			PickerChange1(e) {
				this.sel1 = e.detail.value
			},
			PickerChange2(e) {
				this.sel2 = e.detail.value
			},
			PickerChange3(e) {
				this.sel3 = e.detail.value
			},
			ChooseImage() {
				uni.chooseImage({
					count: 50, //默认9
					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图，默认二者都有
					/* sourceType: ['album'], //从相册选择 */
					success: (res) => {
						if (this.imgList.length != 0) {
							this.imgList = this.imgList.concat(res.tempFilePaths)
						} else {
							this.imgList = res.tempFilePaths
						}
					}
				});
			}
		}
	}
</script>

<style>
	@import "../../colorui/main.css";
	@import "../../colorui/icon.css"; 
</style>
 -->